

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#config.h" class="nav-sub-label">config.h</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_CONFIG_FILE" class="nav-sub-label">MBEDTLS_CONFIG_FILE</a>
              </li>
      

              <li>
                <a href="#stddef.h" class="nav-sub-label">stddef.h</a>
              </li>
      

              <li>
                <a href="#stdint.h" class="nav-sub-label">stdint.h</a>
              </li>
      

              <li>
                <a href="#stdio.h" class="nav-sub-label">stdio.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_BIGNUM_H" class="nav-sub-label">MBEDTLS_BIGNUM_H</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_FILE_IO_ERROR" class="nav-sub-label">MBEDTLS_ERR_MPI_FILE_IO_ERROR</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_BAD_INPUT_DATA" class="nav-sub-label">MBEDTLS_ERR_MPI_BAD_INPUT_DATA</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_INVALID_CHARACTER" class="nav-sub-label">MBEDTLS_ERR_MPI_INVALID_CHARACTER</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL" class="nav-sub-label">MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_NEGATIVE_VALUE" class="nav-sub-label">MBEDTLS_ERR_MPI_NEGATIVE_VALUE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_DIVISION_BY_ZERO" class="nav-sub-label">MBEDTLS_ERR_MPI_DIVISION_BY_ZERO</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_NOT_ACCEPTABLE" class="nav-sub-label">MBEDTLS_ERR_MPI_NOT_ACCEPTABLE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_ERR_MPI_ALLOC_FAILED" class="nav-sub-label">MBEDTLS_ERR_MPI_ALLOC_FAILED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_CHK(f)" class="nav-sub-label">MBEDTLS_MPI_CHK(f)</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_MAX_LIMBS" class="nav-sub-label">MBEDTLS_MPI_MAX_LIMBS</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_WINDOW_SIZE" class="nav-sub-label">MBEDTLS_MPI_WINDOW_SIZE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_MAX_SIZE" class="nav-sub-label">MBEDTLS_MPI_MAX_SIZE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_MAX_BITS" class="nav-sub-label">MBEDTLS_MPI_MAX_BITS</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_MAX_BITS_SCALE100" class="nav-sub-label">MBEDTLS_MPI_MAX_BITS_SCALE100</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_LN_2_DIV_LN_10_SCALE100" class="nav-sub-label">MBEDTLS_LN_2_DIV_LN_10_SCALE100</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_MPI_RW_BUFFER_SIZE" class="nav-sub-label">MBEDTLS_MPI_RW_BUFFER_SIZE</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_INT64" class="nav-sub-label">MBEDTLS_HAVE_INT64</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_INT64" class="nav-sub-label">MBEDTLS_HAVE_INT64</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_UDBL" class="nav-sub-label">MBEDTLS_HAVE_UDBL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_INT64" class="nav-sub-label">MBEDTLS_HAVE_INT64</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_UDBL" class="nav-sub-label">MBEDTLS_HAVE_UDBL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_INT32" class="nav-sub-label">MBEDTLS_HAVE_INT32</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_HAVE_UDBL" class="nav-sub-label">MBEDTLS_HAVE_UDBL</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_DEPRECATED" class="nav-sub-label">MBEDTLS_DEPRECATED</a>
              </li>
      

              <li>
                <a href="#MBEDTLS_DEPRECATED" class="nav-sub-label">MBEDTLS_DEPRECATED</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_mpi_init" class="nav-sub-label">mbedtls_mpi_init</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_free" class="nav-sub-label">mbedtls_mpi_free</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_grow" class="nav-sub-label">mbedtls_mpi_grow</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_shrink" class="nav-sub-label">mbedtls_mpi_shrink</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_copy" class="nav-sub-label">mbedtls_mpi_copy</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_swap" class="nav-sub-label">mbedtls_mpi_swap</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_safe_cond_assign" class="nav-sub-label">mbedtls_mpi_safe_cond_assign</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_safe_cond_swap" class="nav-sub-label">mbedtls_mpi_safe_cond_swap</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_lset" class="nav-sub-label">mbedtls_mpi_lset</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_get_bit" class="nav-sub-label">mbedtls_mpi_get_bit</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_set_bit" class="nav-sub-label">mbedtls_mpi_set_bit</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_lsb" class="nav-sub-label">mbedtls_mpi_lsb</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_bitlen" class="nav-sub-label">mbedtls_mpi_bitlen</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_size" class="nav-sub-label">mbedtls_mpi_size</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_read_string" class="nav-sub-label">mbedtls_mpi_read_string</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_write_string" class="nav-sub-label">mbedtls_mpi_write_string</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_read_file" class="nav-sub-label">mbedtls_mpi_read_file</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_write_file" class="nav-sub-label">mbedtls_mpi_write_file</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_read_binary" class="nav-sub-label">mbedtls_mpi_read_binary</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_write_binary" class="nav-sub-label">mbedtls_mpi_write_binary</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_shift_l" class="nav-sub-label">mbedtls_mpi_shift_l</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_shift_r" class="nav-sub-label">mbedtls_mpi_shift_r</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_cmp_abs" class="nav-sub-label">mbedtls_mpi_cmp_abs</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_cmp_mpi" class="nav-sub-label">mbedtls_mpi_cmp_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_cmp_int" class="nav-sub-label">mbedtls_mpi_cmp_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_add_abs" class="nav-sub-label">mbedtls_mpi_add_abs</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sub_abs" class="nav-sub-label">mbedtls_mpi_sub_abs</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_add_mpi" class="nav-sub-label">mbedtls_mpi_add_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sub_mpi" class="nav-sub-label">mbedtls_mpi_sub_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_add_int" class="nav-sub-label">mbedtls_mpi_add_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sub_int" class="nav-sub-label">mbedtls_mpi_sub_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_mul_mpi" class="nav-sub-label">mbedtls_mpi_mul_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_mul_int" class="nav-sub-label">mbedtls_mpi_mul_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_div_mpi" class="nav-sub-label">mbedtls_mpi_div_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_div_int" class="nav-sub-label">mbedtls_mpi_div_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_mod_mpi" class="nav-sub-label">mbedtls_mpi_mod_mpi</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_mod_int" class="nav-sub-label">mbedtls_mpi_mod_int</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_exp_mod" class="nav-sub-label">mbedtls_mpi_exp_mod</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_fill_random" class="nav-sub-label">mbedtls_mpi_fill_random</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_gcd" class="nav-sub-label">mbedtls_mpi_gcd</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_inv_mod" class="nav-sub-label">mbedtls_mpi_inv_mod</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_is_prime_ext" class="nav-sub-label">mbedtls_mpi_is_prime_ext</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_gen_prime" class="nav-sub-label">mbedtls_mpi_gen_prime</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_self_test" class="nav-sub-label">mbedtls_mpi_self_test</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#MBEDTLS_DEPRECATED" class="nav-sub-label">MBEDTLS_DEPRECATED</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#mbedtls_mpi_sint" class="nav-sub-label">mbedtls_mpi_sint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_uint" class="nav-sub-label">mbedtls_mpi_uint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sint" class="nav-sub-label">mbedtls_mpi_sint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_uint" class="nav-sub-label">mbedtls_mpi_uint</a>
              </li>
      

              <li>
                <a href="#mbedtls_t_udbl" class="nav-sub-label">mbedtls_t_udbl</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sint" class="nav-sub-label">mbedtls_mpi_sint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_uint" class="nav-sub-label">mbedtls_mpi_uint</a>
              </li>
      

              <li>
                <a href="#mbedtls_t_udbl" class="nav-sub-label">mbedtls_t_udbl</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sint" class="nav-sub-label">mbedtls_mpi_sint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_uint" class="nav-sub-label">mbedtls_mpi_uint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_sint" class="nav-sub-label">mbedtls_mpi_sint</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_uint" class="nav-sub-label">mbedtls_mpi_uint</a>
              </li>
      

              <li>
                <a href="#mbedtls_t_udbl" class="nav-sub-label">mbedtls_t_udbl</a>
              </li>
      

              <li>
                <a href="#
mbedtls_mpi;
" class="nav-sub-label">
mbedtls_mpi;
</a>
              </li>
      

              <li>
                <a href="#mbedtls_mpi_gen_prime_flag_t;
" class="nav-sub-label">mbedtls_mpi_gen_prime_flag_t;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="config.h"><span>config.h</span></h4>
      <pre class="doc-declare"><code>#include "config.h"
</code></pre>
      <pre class="doc-comment">#include "config.h"
</pre>

      <h4 id="MBEDTLS_CONFIG_FILE"><span>MBEDTLS_CONFIG_FILE</span></h4>
      <pre class="doc-declare"><code>#include MBEDTLS_CONFIG_FILE
</code></pre>
      <pre class="doc-comment">#include MBEDTLS_CONFIG_FILE
</pre>

      <h4 id="stddef.h"><span>stddef.h</span></h4>
      <pre class="doc-declare"><code>#include &lt;stddef.h&gt;
</code></pre>
      <pre class="doc-comment">#include <stddef.h>
</pre>

      <h4 id="stdint.h"><span>stdint.h</span></h4>
      <pre class="doc-declare"><code>#include &lt;stdint.h&gt;
</code></pre>
      <pre class="doc-comment">#include <stdint.h>
</pre>

      <h4 id="stdio.h"><span>stdio.h</span></h4>
      <pre class="doc-declare"><code>#include &lt;stdio.h&gt;
</code></pre>
      <pre class="doc-comment">#include <stdio.h>
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="MBEDTLS_BIGNUM_H">Marco <span>MBEDTLS_BIGNUM_H</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_BIGNUM_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_FILE_IO_ERROR">Marco <span>MBEDTLS_ERR_MPI_FILE_IO_ERROR</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_FILE_IO_ERROR                    -2 /**< An error occurred while reading from or writing to a file. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_BAD_INPUT_DATA">Marco <span>MBEDTLS_ERR_MPI_BAD_INPUT_DATA</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_BAD_INPUT_DATA                   -4 /**< Bad input parameters to function. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_INVALID_CHARACTER">Marco <span>MBEDTLS_ERR_MPI_INVALID_CHARACTER</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_INVALID_CHARACTER                -6 /**< There is an invalid character in the digit string. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL">Marco <span>MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL                 -8 /**< The buffer is too small to write to. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_NEGATIVE_VALUE">Marco <span>MBEDTLS_ERR_MPI_NEGATIVE_VALUE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_NEGATIVE_VALUE                   0A /**< The input arguments are negative or result in illegal output. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_DIVISION_BY_ZERO">Marco <span>MBEDTLS_ERR_MPI_DIVISION_BY_ZERO</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_DIVISION_BY_ZERO                 0C /**< The input argument for division is zero, which is not allowed. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_NOT_ACCEPTABLE">Marco <span>MBEDTLS_ERR_MPI_NOT_ACCEPTABLE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_NOT_ACCEPTABLE                   0E /**< The input arguments are not acceptable. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_ERR_MPI_ALLOC_FAILED">Marco <span>MBEDTLS_ERR_MPI_ALLOC_FAILED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_ERR_MPI_ALLOC_FAILED                     -16 /**< Memory allocation failed. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_MPI_CHK(f)">Marco <span>MBEDTLS_MPI_CHK(f)</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_CHK(f)      \
   do                          \
   {                           \
       if( ( ret = (f) ) != 0 ) \
           goto cleanup;       \
   } while( 0 )
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_MPI_MAX_LIMBS">Marco <span>MBEDTLS_MPI_MAX_LIMBS</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_MAX_LIMBS                            10000
</code></pre>
      <pre class="doc-comment">/*
 * Maximum size MPIs are allowed to grow to in number of limbs.
 */</pre>

      <h4 id="MBEDTLS_MPI_WINDOW_SIZE">Marco <span>MBEDTLS_MPI_WINDOW_SIZE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_WINDOW_SIZE                          6       /**< Maximum windows size used. */
</code></pre>
      <pre class="doc-comment">/*
 * Maximum window size used for modular exponentiation. Default: 6
 * Minimum value: 1. Maximum value: 6.
 *
 * Result is an array of ( 2 << MBEDTLS_MPI_WINDOW_SIZE ) MPIs used
 * for the sliding window calculation. (So 64 by default)
 *
 * Reduction in size, reduces speed.
 */</pre>

      <h4 id="MBEDTLS_MPI_MAX_SIZE">Marco <span>MBEDTLS_MPI_MAX_SIZE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_MAX_SIZE                             1024    /**< Maximum number of bytes for usable MPIs. */
</code></pre>
      <pre class="doc-comment">/*
 * Maximum size of MPIs allowed in bits and bytes for user-MPIs.
 * ( Default: 512 bytes => 4096 bits, Maximum tested: 2048 bytes => 16384 bits )
 *
 * Note: Calculations can temporarily result in larger MPIs. So the number
 * of limbs required (MBEDTLS_MPI_MAX_LIMBS) is higher.
 */</pre>

      <h4 id="MBEDTLS_MPI_MAX_BITS">Marco <span>MBEDTLS_MPI_MAX_BITS</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_MAX_BITS                             ( 8 * MBEDTLS_MPI_MAX_SIZE )   /**< Maximum number of bits for usable MPIs. */
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_MPI_MAX_BITS_SCALE100">Marco <span>MBEDTLS_MPI_MAX_BITS_SCALE100</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_MAX_BITS_SCALE100         ( 100 * MBEDTLS_MPI_MAX_BITS )
</code></pre>
      <pre class="doc-comment">/*
 * When reading from files with mbedtls_mpi_read_file() and writing to files with
 * mbedtls_mpi_write_file() the buffer should have space
 * for a (short) label, the MPI (in the provided radix), the newline
 * characters and the '\0'.
 *
 * By default we assume at least a 10 char label, a minimum radix of 10
 * (decimal) and a maximum of 4096 bit numbers (1234 decimal chars).
 * Autosized at compile time for at least a 10 char label, a minimum radix
 * of 10 (decimal) for a number of MBEDTLS_MPI_MAX_BITS size.
 *
 * This used to be statically sized to 1250 for a maximum of 4096 bit
 * numbers (1234 decimal chars).
 *
 * Calculate using the formula:
 *  MBEDTLS_MPI_RW_BUFFER_SIZE = ceil(MBEDTLS_MPI_MAX_BITS / ln(10) * ln(2)) +
 *                                LabelSize + 6
 */</pre>

      <h4 id="MBEDTLS_LN_2_DIV_LN_10_SCALE100">Marco <span>MBEDTLS_LN_2_DIV_LN_10_SCALE100</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_LN_2_DIV_LN_10_SCALE100                332
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_MPI_RW_BUFFER_SIZE">Marco <span>MBEDTLS_MPI_RW_BUFFER_SIZE</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_MPI_RW_BUFFER_SIZE            ( ((MBEDTLS_MPI_MAX_BITS_SCALE100 + MBEDTLS_LN_2_DIV_LN_10_SCALE100 - 1) / MBEDTLS_LN_2_DIV_LN_10_SCALE100) + 10 + 6 )
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_INT64">Marco <span>MBEDTLS_HAVE_INT64</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_INT64
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_INT64">Marco <span>MBEDTLS_HAVE_INT64</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_INT64
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_UDBL">Marco <span>MBEDTLS_HAVE_UDBL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_UDBL
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_INT64">Marco <span>MBEDTLS_HAVE_INT64</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_INT64
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_UDBL">Marco <span>MBEDTLS_HAVE_UDBL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_UDBL
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_INT32">Marco <span>MBEDTLS_HAVE_INT32</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_INT32
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_HAVE_UDBL">Marco <span>MBEDTLS_HAVE_UDBL</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_HAVE_UDBL
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_DEPRECATED">Marco <span>MBEDTLS_DEPRECATED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_DEPRECATED     __attribute__((deprecated))
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="MBEDTLS_DEPRECATED">Marco <span>MBEDTLS_DEPRECATED</span></h4>
      <pre class="doc-declare"><code>#define MBEDTLS_DEPRECATED
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="mbedtls_mpi_init">Func <span>mbedtls_mpi_init</span></h4>
      <pre class="doc-declare"><code>void mbedtls_mpi_init( mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief           Initialize an MPI context.
 *
 *                  This makes the MPI ready to be set or freed,
 *                  but does not define a value for the MPI.
 *
 * \param X         The MPI context to initialize. This must not be \c NULL.
 */</pre>

      <h4 id="mbedtls_mpi_free">Func <span>mbedtls_mpi_free</span></h4>
      <pre class="doc-declare"><code>void mbedtls_mpi_free( mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief          This function frees the components of an MPI context.
 *
 * \param X        The MPI context to be cleared. This may be \c NULL,
 *                 in which case this function is a no-op. If it is
 *                 not \c NULL, it must point to an initialized MPI.
 */</pre>

      <h4 id="mbedtls_mpi_grow">Func <span>mbedtls_mpi_grow</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Enlarge an MPI to the specified number of limbs.
 *
 * \note           This function does nothing if the MPI is
 *                 already large enough.
 *
 * \param X        The MPI to grow. It must be initialized.
 * \param nblimbs  The target number of limbs.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_shrink">Func <span>mbedtls_mpi_shrink</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs );</code></pre>
      <pre class="doc-comment">/**
 * \brief          This function resizes an MPI downwards, keeping at least the
 *                 specified number of limbs.
 *
 *                 If \c X is smaller than \c nblimbs, it is resized up
 *                 instead.
 *
 * \param X        The MPI to shrink. This must point to an initialized MPI.
 * \param nblimbs  The minimum number of limbs to keep.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed
 *                 (this can only happen when resizing up).
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_copy">Func <span>mbedtls_mpi_copy</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Make a copy of an MPI.
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param Y        The source MPI. This must point to an initialized MPI.
 *
 * \note           The limb-buffer in the destination MPI is enlarged
 *                 if necessary to hold the value in the source MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_swap">Func <span>mbedtls_mpi_swap</span></h4>
      <pre class="doc-declare"><code>void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Swap the contents of two MPIs.
 *
 * \param X        The first MPI. It must be initialized.
 * \param Y        The second MPI. It must be initialized.
 */</pre>

      <h4 id="mbedtls_mpi_safe_cond_assign">Func <span>mbedtls_mpi_safe_cond_assign</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a safe conditional copy of MPI which doesn't
 *                 reveal whether the condition was true or not.
 *
 * \param X        The MPI to conditionally assign to. This must point
 *                 to an initialized MPI.
 * \param Y        The MPI to be assigned from. This must point to an
 *                 initialized MPI.
 * \param assign   The condition deciding whether to perform the
 *                 assignment or not. Possible values:
 *                 * \c 1: Perform the assignment `X = Y`.
 *                 * \c 0: Keep the original value of \p X.
 *
 * \note           This function is equivalent to
 *                      `if( assign ) mbedtls_mpi_copy( X, Y );`
 *                 except that it avoids leaking any information about whether
 *                 the assignment was done or not (the above code may leak
 *                 information through branch prediction and/or memory access
 *                 patterns analysis).
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_safe_cond_swap">Func <span>mbedtls_mpi_safe_cond_swap</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a safe conditional swap which doesn't
 *                 reveal whether the condition was true or not.
 *
 * \param X        The first MPI. This must be initialized.
 * \param Y        The second MPI. This must be initialized.
 * \param assign   The condition deciding whether to perform
 *                 the swap or not. Possible values:
 *                 * \c 1: Swap the values of \p X and \p Y.
 *                 * \c 0: Keep the original values of \p X and \p Y.
 *
 * \note           This function is equivalent to
 *                      if( assign ) mbedtls_mpi_swap( X, Y );
 *                 except that it avoids leaking any information about whether
 *                 the assignment was done or not (the above code may leak
 *                 information through branch prediction and/or memory access
 *                 patterns analysis).
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 *
 */</pre>

      <h4 id="mbedtls_mpi_lset">Func <span>mbedtls_mpi_lset</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Store integer value in MPI.
 *
 * \param X        The MPI to set. This must be initialized.
 * \param z        The value to use.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_get_bit">Func <span>mbedtls_mpi_get_bit</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_get_bit( const mbedtls_mpi *X, size_t pos );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Get a specific bit from an MPI.
 *
 * \param X        The MPI to query. This must be initialized.
 * \param pos      Zero-based index of the bit to query.
 *
 * \return         \c 0 or \c 1 on success, depending on whether bit \c pos
 *                 of \c X is unset or set.
 * \return         A negative error code on failure.
 */</pre>

      <h4 id="mbedtls_mpi_set_bit">Func <span>mbedtls_mpi_set_bit</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_set_bit( mbedtls_mpi *X, size_t pos, unsigned char val );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Modify a specific bit in an MPI.
 *
 * \note           This function will grow the target MPI if necessary to set a
 *                 bit to \c 1 in a not yet existing limb. It will not grow if
 *                 the bit should be set to \c 0.
 *
 * \param X        The MPI to modify. This must be initialized.
 * \param pos      Zero-based index of the bit to modify.
 * \param val      The desired value of bit \c pos: \c 0 or \c 1.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_lsb">Func <span>mbedtls_mpi_lsb</span></h4>
      <pre class="doc-declare"><code>size_t mbedtls_mpi_lsb( const mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Return the number of bits of value \c 0 before the
 *                 least significant bit of value \c 1.
 *
 * \note           This is the same as the zero-based index of
 *                 the least significant bit of value \c 1.
 *
 * \param X        The MPI to query.
 *
 * \return         The number of bits of value \c 0 before the least significant
 *                 bit of value \c 1 in \p X.
 */</pre>

      <h4 id="mbedtls_mpi_bitlen">Func <span>mbedtls_mpi_bitlen</span></h4>
      <pre class="doc-declare"><code>size_t mbedtls_mpi_bitlen( const mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Return the number of bits up to and including the most
 *                 significant bit of value \c 1.
 *
 * * \note         This is same as the one-based index of the most
 *                 significant bit of value \c 1.
 *
 * \param X        The MPI to query. This must point to an initialized MPI.
 *
 * \return         The number of bits up to and including the most
 *                 significant bit of value \c 1.
 */</pre>

      <h4 id="mbedtls_mpi_size">Func <span>mbedtls_mpi_size</span></h4>
      <pre class="doc-declare"><code>size_t mbedtls_mpi_size( const mbedtls_mpi *X );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Return the total size of an MPI value in bytes.
 *
 * \param X        The MPI to use. This must point to an initialized MPI.
 *
 * \note           The value returned by this function may be less than
 *                 the number of bytes used to store \p X internally.
 *                 This happens if and only if there are trailing bytes
 *                 of value zero.
 *
 * \return         The least number of bytes capable of storing
 *                 the absolute value of \p X.
 */</pre>

      <h4 id="mbedtls_mpi_read_string">Func <span>mbedtls_mpi_read_string</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_read_string( mbedtls_mpi *X, int radix, const char *s );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Import an MPI from an ASCII string.
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param radix    The numeric base of the input string.
 * \param s        Null-terminated string buffer.
 *
 * \return         \c 0 if successful.
 * \return         A negative error code on failure.
 */</pre>

      <h4 id="mbedtls_mpi_write_string">Func <span>mbedtls_mpi_write_string</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix,
                             char *buf, size_t buflen, size_t *olen );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Export an MPI to an ASCII string.
 *
 * \param X        The source MPI. This must point to an initialized MPI.
 * \param radix    The numeric base of the output string.
 * \param buf      The buffer to write the string to. This must be writable
 *                 buffer of length \p buflen Bytes.
 * \param buflen   The available size in Bytes of \p buf.
 * \param olen     The address at which to store the length of the string
 *                 written, including the  final \c NULL byte. This must
 *                 not be \c NULL.
 *
 * \note           You can call this function with `buflen == 0` to obtain the
 *                 minimum required buffer size in `*olen`.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the target buffer \p buf
 *                 is too small to hold the value of \p X in the desired base.
 *                 In this case, `*olen` is nonetheless updated to contain the
 *                 size of \p buf required for a successful call.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_read_file">Func <span>mbedtls_mpi_read_file</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_read_file( mbedtls_mpi *X, int radix, FILE *fin );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Read an MPI from a line in an opened file.
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param radix    The numeric base of the string representation used
 *                 in the source line.
 * \param fin      The input file handle to use. This must not be \c NULL.
 *
 * \note           On success, this function advances the file stream
 *                 to the end of the current line or to EOF.
 *
 *                 The function returns \c 0 on an empty line.
 *
 *                 Leading whitespaces are ignored, as is a
 *                 '0x' prefix for radix \c 16.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if the file read buffer
 *                 is too small.
 * \return         Another negative error code on failure.
 */</pre>

      <h4 id="mbedtls_mpi_write_file">Func <span>mbedtls_mpi_write_file</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X,
                           int radix, FILE *fout );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Export an MPI into an opened file.
 *
 * \param p        A string prefix to emit prior to the MPI data.
 *                 For example, this might be a label, or "0x" when
 *                 printing in base \c 16. This may be \c NULL if no prefix
 *                 is needed.
 * \param X        The source MPI. This must point to an initialized MPI.
 * \param radix    The numeric base to be used in the emitted string.
 * \param fout     The output file handle. This may be \c NULL, in which case
 *                 the output is written to \c stdout.
 *
 * \return         \c 0 if successful.
 * \return         A negative error code on failure.
 */</pre>

      <h4 id="mbedtls_mpi_read_binary">Func <span>mbedtls_mpi_read_binary</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf,
                            size_t buflen );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Import an MPI from unsigned big endian binary data.
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param buf      The input buffer. This must be a readable buffer of length
 *                 \p buflen Bytes.
 * \param buflen   The length of the input buffer \p p in Bytes.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_write_binary">Func <span>mbedtls_mpi_write_binary</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf,
                             size_t buflen );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Export an MPI into unsigned big endian binary data
 *                 of fixed size.
 *
 * \param X        The source MPI. This must point to an initialized MPI.
 * \param buf      The output buffer. This must be a writable buffer of length
 *                 \p buflen Bytes.
 * \param buflen   The size of the output buffer \p buf in Bytes.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL if \p buf isn't
 *                 large enough to hold the value of \p X.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_shift_l">Func <span>mbedtls_mpi_shift_l</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_shift_l( mbedtls_mpi *X, size_t count );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a left-shift on an MPI: X <<= count
 *
 * \param X        The MPI to shift. This must point to an initialized MPI.
 * \param count    The number of bits to shift by.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_shift_r">Func <span>mbedtls_mpi_shift_r</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_shift_r( mbedtls_mpi *X, size_t count );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a right-shift on an MPI: X >>= count
 *
 * \param X        The MPI to shift. This must point to an initialized MPI.
 * \param count    The number of bits to shift by.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_cmp_abs">Func <span>mbedtls_mpi_cmp_abs</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_cmp_abs( const mbedtls_mpi *X, const mbedtls_mpi *Y );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Compare the absolute values of two MPIs.
 *
 * \param X        The left-hand MPI. This must point to an initialized MPI.
 * \param Y        The right-hand MPI. This must point to an initialized MPI.
 *
 * \return         \c 1 if `|X|` is greater than `|Y|`.
 * \return         \c -1 if `|X|` is lesser than `|Y|`.
 * \return         \c 0 if `|X|` is equal to `|Y|`.
 */</pre>

      <h4 id="mbedtls_mpi_cmp_mpi">Func <span>mbedtls_mpi_cmp_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_cmp_mpi( const mbedtls_mpi *X, const mbedtls_mpi *Y );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Compare two MPIs.
 *
 * \param X        The left-hand MPI. This must point to an initialized MPI.
 * \param Y        The right-hand MPI. This must point to an initialized MPI.
 *
 * \return         \c 1 if \p X is greater than \p Y.
 * \return         \c -1 if \p X is lesser than \p Y.
 * \return         \c 0 if \p X is equal to \p Y.
 */</pre>

      <h4 id="mbedtls_mpi_cmp_int">Func <span>mbedtls_mpi_cmp_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Compare an MPI with an integer.
 *
 * \param X        The left-hand MPI. This must point to an initialized MPI.
 * \param z        The integer value to compare \p X to.
 *
 * \return         \c 1 if \p X is greater than \p z.
 * \return         \c -1 if \p X is lesser than \p z.
 * \return         \c 0 if \p X is equal to \p z.
 */</pre>

      <h4 id="mbedtls_mpi_add_abs">Func <span>mbedtls_mpi_add_abs</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_add_abs( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform an unsigned addition of MPIs: X = |A| + |B|
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The first summand. This must point to an initialized MPI.
 * \param B        The second summand. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_sub_abs">Func <span>mbedtls_mpi_sub_abs</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_sub_abs( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform an unsigned subtraction of MPIs: X = |A| - |B|
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The minuend. This must point to an initialized MPI.
 * \param B        The subtrahend. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p B is greater than \p A.
 * \return         Another negative error code on different kinds of failure.
 *
 */</pre>

      <h4 id="mbedtls_mpi_add_mpi">Func <span>mbedtls_mpi_add_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_add_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a signed addition of MPIs: X = A + B
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The first summand. This must point to an initialized MPI.
 * \param B        The second summand. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_sub_mpi">Func <span>mbedtls_mpi_sub_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_sub_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a signed subtraction of MPIs: X = A - B
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The minuend. This must point to an initialized MPI.
 * \param B        The subtrahend. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_add_int">Func <span>mbedtls_mpi_add_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A,
                        mbedtls_mpi_sint b );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a signed addition of an MPI and an integer: X = A + b
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The first summand. This must point to an initialized MPI.
 * \param b        The second summand.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_sub_int">Func <span>mbedtls_mpi_sub_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls_mpi *A,
                        mbedtls_mpi_sint b );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a signed subtraction of an MPI and an integer:
 *                 X = A - b
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The minuend. This must point to an initialized MPI.
 * \param b        The subtrahend.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_mul_mpi">Func <span>mbedtls_mpi_mul_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_mul_mpi( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a multiplication of two MPIs: X = A * B
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The first factor. This must point to an initialized MPI.
 * \param B        The second factor. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 *
 */</pre>

      <h4 id="mbedtls_mpi_mul_int">Func <span>mbedtls_mpi_mul_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A,
                        mbedtls_mpi_uint b );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a multiplication of an MPI with an unsigned integer:
 *                 X = A * b
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The first factor. This must point to an initialized MPI.
 * \param b        The second factor.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 *
 */</pre>

      <h4 id="mbedtls_mpi_div_mpi">Func <span>mbedtls_mpi_div_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a division with remainder of two MPIs:
 *                 A = Q * B + R
 *
 * \param Q        The destination MPI for the quotient.
 *                 This may be \c NULL if the value of the
 *                 quotient is not needed.
 * \param R        The destination MPI for the remainder value.
 *                 This may be \c NULL if the value of the
 *                 remainder is not needed.
 * \param A        The dividend. This must point to an initialized MPi.
 * \param B        The divisor. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_div_int">Func <span>mbedtls_mpi_div_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
                        mbedtls_mpi_sint b );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a division with remainder of an MPI by an integer:
 *                 A = Q * b + R
 *
 * \param Q        The destination MPI for the quotient.
 *                 This may be \c NULL if the value of the
 *                 quotient is not needed.
 * \param R        The destination MPI for the remainder value.
 *                 This may be \c NULL if the value of the
 *                 remainder is not needed.
 * \param A        The dividend. This must point to an initialized MPi.
 * \param b        The divisor.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p b equals zero.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_mod_mpi">Func <span>mbedtls_mpi_mod_mpi</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_mod_mpi( mbedtls_mpi *R, const mbedtls_mpi *A,
                        const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a modular reduction. R = A mod B
 *
 * \param R        The destination MPI for the residue value.
 *                 This must point to an initialized MPI.
 * \param A        The MPI to compute the residue of.
 *                 This must point to an initialized MPI.
 * \param B        The base of the modular reduction.
 *                 This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p B equals zero.
 * \return         #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p B is negative.
 * \return         Another negative error code on different kinds of failure.
 *
 */</pre>

      <h4 id="mbedtls_mpi_mod_int">Func <span>mbedtls_mpi_mod_int</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A,
                        mbedtls_mpi_sint b );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a modular reduction with respect to an integer.
 *                 r = A mod b
 *
 * \param r        The address at which to store the residue.
 *                 This must not be \c NULL.
 * \param A        The MPI to compute the residue of.
 *                 This must point to an initialized MPi.
 * \param b        The integer base of the modular reduction.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p b equals zero.
 * \return         #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p b is negative.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_exp_mod">Func <span>mbedtls_mpi_exp_mod</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *E, const mbedtls_mpi *N,
                        mbedtls_mpi *_RR );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a sliding-window exponentiation: X = A^E mod N
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The base of the exponentiation.
 *                 This must point to an initialized MPI.
 * \param E        The exponent MPI. This must point to an initialized MPI.
 * \param N        The base for the modular reduction. This must point to an
 *                 initialized MPI.
 * \param _RR      A helper MPI depending solely on \p N which can be used to
 *                 speed-up multiple modular exponentiations for the same value
 *                 of \p N. This may be \c NULL. If it is not \c NULL, it must
 *                 point to an initialized MPI. If it hasn't been used after
 *                 the call to mbedtls_mpi_init(), this function will compute
 *                 the helper value and store it in \p _RR for reuse on
 *                 subsequent calls to this function. Otherwise, the function
 *                 will assume that \p _RR holds the helper value set by a
 *                 previous call to mbedtls_mpi_exp_mod(), and reuse it.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or
 *                 even, or if \c E is negative.
 * \return         Another negative error code on different kinds of failures.
 *
 */</pre>

      <h4 id="mbedtls_mpi_fill_random">Func <span>mbedtls_mpi_fill_random</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_fill_random( mbedtls_mpi *X, size_t size,
                    int (*f_rng)(void *, unsigned char *, size_t),
                    void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Fill an MPI with a number of random bytes.
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param size     The number of random bytes to generate.
 * \param f_rng    The RNG function to use. This must not be \c NULL.
 * \param p_rng    The RNG parameter to be passed to \p f_rng. This may be
 *                 \c NULL if \p f_rng doesn't need a context argument.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on failure.
 *
 * \note           The bytes obtained from the RNG are interpreted
 *                 as a big-endian representation of an MPI; this can
 *                 be relevant in applications like deterministic ECDSA.
 */</pre>

      <h4 id="mbedtls_mpi_gcd">Func <span>mbedtls_mpi_gcd</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_gcd( mbedtls_mpi *G, const mbedtls_mpi *A,
                    const mbedtls_mpi *B );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Compute the greatest common divisor: G = gcd(A, B)
 *
 * \param G        The destination MPI. This must point to an initialized MPI.
 * \param A        The first operand. This must point to an initialized MPI.
 * \param B        The second operand. This must point to an initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         Another negative error code on different kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_inv_mod">Func <span>mbedtls_mpi_inv_mod</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_inv_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
                        const mbedtls_mpi *N );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Compute the modular inverse: X = A^-1 mod N
 *
 * \param X        The destination MPI. This must point to an initialized MPI.
 * \param A        The MPI to calculate the modular inverse of. This must point
 *                 to an initialized MPI.
 * \param N        The base of the modular inversion. This must point to an
 *                 initialized MPI.
 *
 * \return         \c 0 if successful.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \p N is less than
 *                 or equal to one.
 * \return         #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p has no modular inverse
 *                 with respect to \p N.
 */</pre>

      <h4 id="mbedtls_mpi_is_prime_ext">Func <span>mbedtls_mpi_is_prime_ext</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_is_prime_ext( const mbedtls_mpi *X, int rounds,
                             int (*f_rng)(void *, unsigned char *, size_t),
                             void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Miller-Rabin primality test.
 *
 * \warning        If \p X is potentially generated by an adversary, for example
 *                 when validating cryptographic parameters that you didn't
 *                 generate yourself and that are supposed to be prime, then
 *                 \p rounds should be at least the half of the security
 *                 strength of the cryptographic algorithm. On the other hand,
 *                 if \p X is chosen uniformly or non-adversially (as is the
 *                 case when mbedtls_mpi_gen_prime calls this function), then
 *                 \p rounds can be much lower.
 *
 * \param X        The MPI to check for primality.
 *                 This must point to an initialized MPI.
 * \param rounds   The number of bases to perform the Miller-Rabin primality
 *                 test for. The probability of returning 0 on a composite is
 *                 at most 2<sup>-2*\p rounds</sup>.
 * \param f_rng    The RNG function to use. This must not be \c NULL.
 * \param p_rng    The RNG parameter to be passed to \p f_rng.
 *                 This may be \c NULL if \p f_rng doesn't use
 *                 a context parameter.
 *
 * \return         \c 0 if successful, i.e. \p X is probably prime.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p X is not prime.
 * \return         Another negative error code on other kinds of failure.
 */</pre>

      <h4 id="mbedtls_mpi_gen_prime">Func <span>mbedtls_mpi_gen_prime</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_gen_prime( mbedtls_mpi *X, size_t nbits, int flags,
                  int (*f_rng)(void *, unsigned char *, size_t),
                  void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Generate a prime number.
 *
 * \param X        The destination MPI to store the generated prime in.
 *                 This must point to an initialized MPi.
 * \param nbits    The required size of the destination MPI in bits.
 *                 This must be between \c 3 and #MBEDTLS_MPI_MAX_BITS.
 * \param flags    A mask of flags of type #mbedtls_mpi_gen_prime_flag_t.
 * \param f_rng    The RNG function to use. This must not be \c NULL.
 * \param p_rng    The RNG parameter to be passed to \p f_rng.
 *                 This may be \c NULL if \p f_rng doesn't use
 *                 a context parameter.
 *
 * \return         \c 0 if successful, in which case \p X holds a
 *                 probably prime number.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if `nbits` is not between
 *                 \c 3 and #MBEDTLS_MPI_MAX_BITS.
 */</pre>

      <h4 id="mbedtls_mpi_self_test">Func <span>mbedtls_mpi_self_test</span></h4>
      <pre class="doc-declare"><code>int mbedtls_mpi_self_test( int verbose );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Checkup routine
 *
 * \return         0 if successful, or 1 if the test failed
 */</pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="MBEDTLS_DEPRECATED">Variable <span>MBEDTLS_DEPRECATED</span></h4>
      <pre class="doc-declare"><code>MBEDTLS_DEPRECATED int mbedtls_mpi_is_prime( const mbedtls_mpi *X,
                         int (*f_rng)(void *, unsigned char *, size_t),
                         void *p_rng );</code></pre>
      <pre class="doc-comment">/**
 * \brief          Perform a Miller-Rabin primality test with error
 *                 probability of 2<sup>-80</sup>.
 *
 * \deprecated     Superseded by mbedtls_mpi_is_prime_ext() which allows
 *                 specifying the number of Miller-Rabin rounds.
 *
 * \param X        The MPI to check for primality.
 *                 This must point to an initialized MPI.
 * \param f_rng    The RNG function to use. This must not be \c NULL.
 * \param p_rng    The RNG parameter to be passed to \p f_rng.
 *                 This may be \c NULL if \p f_rng doesn't use a
 *                 context parameter.
 *
 * \return         \c 0 if successful, i.e. \p X is probably prime.
 * \return         #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed.
 * \return         #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p X is not prime.
 * \return         Another negative error code on other kinds of failure.
 */</pre>
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="mbedtls_mpi_sint">Typedef <span>mbedtls_mpi_sint</span></h4>
      <pre class="doc-declare"><code>typedef int64_t mbedtls_mpi_sint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_uint">Typedef <span>mbedtls_mpi_uint</span></h4>
      <pre class="doc-declare"><code>typedef uint64_t mbedtls_mpi_uint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_sint">Typedef <span>mbedtls_mpi_sint</span></h4>
      <pre class="doc-declare"><code>typedef int64_t mbedtls_mpi_sint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_uint">Typedef <span>mbedtls_mpi_uint</span></h4>
      <pre class="doc-declare"><code>typedef uint64_t mbedtls_mpi_uint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_t_udbl">Typedef <span>mbedtls_t_udbl</span></h4>
      <pre class="doc-declare"><code>typedef unsigned int mbedtls_t_udbl __attribute__((mode(TI)));
</code></pre>
      <pre class="doc-comment">/* mbedtls_t_udbl defined as 128-bit unsigned int */</pre>

      <h4 id="mbedtls_mpi_sint">Typedef <span>mbedtls_mpi_sint</span></h4>
      <pre class="doc-declare"><code>typedef int64_t mbedtls_mpi_sint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_uint">Typedef <span>mbedtls_mpi_uint</span></h4>
      <pre class="doc-declare"><code>typedef uint64_t mbedtls_mpi_uint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_t_udbl">Typedef <span>mbedtls_t_udbl</span></h4>
      <pre class="doc-declare"><code>typedef __uint128_t mbedtls_t_udbl;
</code></pre>
      <pre class="doc-comment">/* mbedtls_t_udbl defined as 128-bit unsigned int */</pre>

      <h4 id="mbedtls_mpi_sint">Typedef <span>mbedtls_mpi_sint</span></h4>
      <pre class="doc-declare"><code>typedef int64_t mbedtls_mpi_sint;
</code></pre>
      <pre class="doc-comment">/* Force 64-bit integers with unknown compiler */</pre>

      <h4 id="mbedtls_mpi_uint">Typedef <span>mbedtls_mpi_uint</span></h4>
      <pre class="doc-declare"><code>typedef uint64_t mbedtls_mpi_uint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_sint">Typedef <span>mbedtls_mpi_sint</span></h4>
      <pre class="doc-declare"><code>typedef int32_t mbedtls_mpi_sint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_mpi_uint">Typedef <span>mbedtls_mpi_uint</span></h4>
      <pre class="doc-declare"><code>typedef uint32_t mbedtls_mpi_uint;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="mbedtls_t_udbl">Typedef <span>mbedtls_t_udbl</span></h4>
      <pre class="doc-declare"><code>typedef uint64_t mbedtls_t_udbl;
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="
mbedtls_mpi;
">Typedef <span>
mbedtls_mpi;
</span></h4>
      <pre class="doc-declare"><code>typedef struct mbedtls_mpi
{
   int s;             /*!<  integer sign      */
   size_t n;          /*!<  total # of limbs  */
   mbedtls_mpi_uint *p;         /*!<  pointer to limbs  */
}
mbedtls_mpi;
</code></pre>
      <pre class="doc-comment">/**
 * \brief          MPI structure
 */</pre>

      <h4 id="mbedtls_mpi_gen_prime_flag_t;
">Typedef <span>mbedtls_mpi_gen_prime_flag_t;
</span></h4>
      <pre class="doc-declare"><code>typedef enum {
   MBEDTLS_MPI_GEN_PRIME_FLAG_DH =     1, /**< (X-1)/2 is prime too */
   MBEDTLS_MPI_GEN_PRIME_FLAG_LOW_ERR = 2, /**< lower error rate from 2<sup>-80</sup> to 2<sup>-128</sup> */
} mbedtls_mpi_gen_prime_flag_t;
</code></pre>
      <pre class="doc-comment">/**
 * \brief Flags for mbedtls_mpi_gen_prime()
 *
 * Each of these flags is a constraint on the result X returned by
 * mbedtls_mpi_gen_prime().
 */</pre>
    </div>
  </body>
</html>
            